/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ValorActual.java
 *
 * Created on 17/03/2012, 11:42:24 PM
 */

package frontera;

import entidad.Medicion;
import control.CRUDDatos;

/**
 *
 * @author user
 */
public class ValorActual extends javax.swing.JFrame {

    /** Creates new form ValorActual */
    public ValorActual() {
        initComponents();

        CRUDDatos crud = new CRUDDatos();
        Medicion medicion = crud.valorActual();

        temperaturaL.setText(Double.toString(medicion.getTemperatura()) + " ºC");
        presionL.setText(Double.toString(medicion.getPresion()) + " mmHg");
        pluviosidadL.setText(Double.toString(medicion.getPluviosidad()) + " mm");

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pluviosidadL = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        temperaturaL = new javax.swing.JLabel();
        presionL = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        pluviosidadL.setText("mm");

        jLabel3.setText("Presión atmosférica:");

        jLabel4.setText("Pluviosidad:");

        temperaturaL.setText("ºC");

        presionL.setText("mmHg");

        jLabel2.setText("Temperatura:");

        jLabel5.setFont(new java.awt.Font("Verdana", 0, 18));
        jLabel5.setText("Valor actual");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel5)
                .addContainerGap(157, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(67, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3)
                    .addComponent(jLabel4))
                .addGap(23, 23, 23)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pluviosidadL)
                    .addComponent(presionL)
                    .addComponent(temperaturaL))
                .addGap(57, 57, 57))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel5)
                .addGap(28, 28, 28)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(temperaturaL))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(presionL))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(pluviosidadL))
                .addContainerGap(19, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel pluviosidadL;
    private javax.swing.JLabel presionL;
    private javax.swing.JLabel temperaturaL;
    // End of variables declaration//GEN-END:variables

}
